Skip to content

Ruby: Fix bug in implicitAssignmentNode#21907

Draft
hvitved wants to merge 8 commits into
github:mainfrom
hvitved:ruby/implicit-local-fix
Draft

Ruby: Fix bug in implicitAssignmentNode#21907
hvitved wants to merge 8 commits into
github:mainfrom
hvitved:ruby/implicit-local-fix

Conversation

@hvitved
Copy link
Copy Markdown
Contributor

@hvitved hvitved commented May 29, 2026

No description provided.

@github-actions github-actions Bot added Ruby Rust Pull requests that update Rust code labels May 29, 2026

predicate declInScope(AstNode definingNode, string name, AstNode scope) {
scopeDefinesParameterVariable(scope, name, definingNode, _)
or
result = this.getChild(index) and
index = min(int i | result = this.getChild(i) | i)
}
private class LetExprSiblingShadowingDecl extends SiblingShadowingDecl instanceof LetExpr {
/**
* Holds if `n` is a node that may access a local named `name`.
*/
predicate accessCand(AstNode n, string name);

private class Scope extends AstNodeFinal {
Scope() {
declInScope(_, _, this)
* if let Some(x) = opt && let x = x + 1 {
* // the second declaration of `x` is in scope here
* }
* ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ruby Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants